//
//  HoDialogView.h
//  HOrangiOS
//
//  Created by YOrange on 2018/5/25.
//  Copyright © 2018年 YOrange. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSInteger, AnimationShowType){
    MiddleShow = 0,
    BottomShow = 1
};

@interface HoDialogView : UIView

@property (assign, nonatomic) AnimationShowType type;

@property (assign, nonatomic) BOOL clickEmptyNotDismiss;

@property (assign, nonatomic) BOOL isHidden;

///显示的视图
@property (weak, nonatomic) UIView *dialog;

///点击空白区域的回调
@property (copy, nonatomic) void (^clickEmtypBlock)(void);

@property (strong, nonatomic) UIView * bgView;

//默认动画是中间的
-(instancetype)initWithDialogView:(UIView *)dialogView;

-(instancetype)initWithDialogView:(UIView *)dialogView animationType:(AnimationShowType)type;

-(void)show:(UIView *)parentView;

-(void)dismiss;

///上移是正数，下移是负数
-(void)bottomMove:(CGFloat)distance;


///直接加载view在弹框上，弹出视图
+(HoDialogView *)showAlertView:(UIView *)vi;

+(HoDialogView *)showAlertView:(UIView *)vi type:(AnimationShowType)type;

+(HoDialogView *)showAlertXibView:(NSString *)xib;

+(HoDialogView *)showAlertXibView:(NSString *)xib type:(AnimationShowType)type;

@end

